import { createApp } from 'vue';
import { createRouter, createWebHistory } from 'vue-router';
import { createPinia } from 'pinia';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import './style.css';
import App from './App.vue';

// 创建路由
const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('./components/HelloWorld.vue'),
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

// 创建Pinia实例
const pinia = createPinia();

// 创建Vue应用
const app = createApp(App);

// 使用插件
app.use(router);
app.use(pinia);
app.use(ElementPlus);

// 挂载应用
app.mount('#app');
